home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
comm
/
cnet
/
revive.lha
/
ReViveDBM
< prev
Wrap
Text File
|
1995-09-29
|
3KB
|
56 lines
/**************************************************************************\
$VER: ReVive DataBase Manager, v2.0 (29-Sep-95) by Dotoran!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR;call IERROR
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch
a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
mail=1 /* Backup UUCP Mail Directories as well? (0=No, 1=Yes) */
skip="1 3" /* ID's to SKIP backup of mail dirs. Parsed in SPACES */
arg v1;zz="00"x;if v1=1 then do;gu 40;id=result;in=(id*38)-38
call open(f1,"SysData:ReViveDB","r");call seek(f1,in,"b")
uid=translate(strip(readch(f1,4),,zz),reverse(bb),bb)
han=translate(strip(readch(f1,20),,zz),reverse(bb),bb)
pas=translate(strip(readch(f1,14),,zz),reverse(bb),bb)
call close(f1);gu 41;sid=result;gu 1;handle=result
gu 2;password=result;gu 39;mdir=result
if sid~=uid|handle~=han|password~=pas then do
se "ceUpdating cbReVive cadatabasec6..."
call open(f1,"SysData:ReViveDB","r")
call seek(f1,in,"b")
z1=translate(sid,bb,reverse(bb))
z2=translate(handle,bb,reverse(bb))
z3=translate(password,bb,reverse(bb))
z=left(z1,4,zz)left(z2,20,zz)left(z3,14,zz)
call writech(f1,z)
call close(f1);tr "cddonec6.";end
if mail=0|index(" "skip" ",id)>0 then exit
se "caBacking up c6mail directory...$4 delete mail:users2/"mdir"/#?}"
address command "copy mail:users/"mdir"/ mail:users2/"mdir"/ all"
tr "cdcompletedc6!";exit;end
gu 2400088;acts=result
tr "caCreating cbReVive cdDataBasecb: ca"acts" c6Accounts.n1@4"
call open(f1,"SysData:ReViveDB","w");do i=1 to acts
loadscratch i;st=result;savescratch (-i);getscratch 1;handle=result
se "c7(cd"right("cb"i,7,"0")"c7) ca"right(handle,20)"c9: "
if handle="!" then se "c9Deleted Accountc6, "
getscratch 2;password=result;getscratch 41;uid=result
z1=translate(sid,bb,reverse(bb));z2=translate(handle,bb,reverse(bb))
z3=translate(password,bb,reverse(bb))
z=left(z1,4,zz)left(z2,20,zz)left(z3,14,zz)
call writech(f1,z);tr "ceData cbUpdatedc6!";end i
call close(f1);tr "n1cdCompletedc6!n1";if mail=0 then exit
if ~exists("mail:users2/") then address command "makedir mail:users2"
tr "caCreating cbReVive ceDuplicate UUCP Directoriesc6...c9n1@4"
tr "#4 copy mail:users/ mail:users2/ all}cdDonec6!"
exit
SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')'
e2=' Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960;b=result;c='"'a||b'"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2
e=sourceline(sigl);do while e~='';e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
IERROR:;bb="`~!@#$%^&*()_-+=|\abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[]{};':"d2c(34)",./<>?";return
/** Last Edited: 29-Sep-95 ************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/